<div class="attendease-navigation">
  <ul class="attendease-dates">
    {% for day in page.dates %}
    <li class="{% if day.date == page.day.date %}active{% endif %}" data-date="{{ day.date }}">
      <a href="/schedule/{{ day.date }}/">{{ day.date_formatted }}</a>
    </li>
    {% endfor %}
    <li>
      <a href="/schedule/sessions/">List all</a>
    </li>
  </ul>
</div>

<div class="attendease-schedule" data-date="{{ page.day.date }}">
  {% unless page.instances.size > 0 %}
    <p>No sessions currently scheduled for this day.</p>
  {% endunless %}

  {% for instance in page.instances %}
    <div class="attendease-session-and-instance {{ instance.session.filter_tags }}" data-instance-id="{{ instance.id }}" data-session-id="{{ instance.session.id }}">
      <div class="attendease-name">
        <h2><a href="/schedule/sessions/{{ instance.session.slug }}">{{ instance.session.name }}</a></h2>
      </div>

      <div class="attendease-presenters">
        {% for presenter in instance.session.presenters %}
          <div class="attendease-presenter-mini{% if presenter.featured %} attendease-featured-presenter{% endif %}" data-presenter-id="{{ presenter.id }}">
            <div class="attendease-presenter-name">
              <a href="/presenters/{{ presenter.slug }}">{{ presenter.first_name }} {{ presenter.last_name }}</a>
            </div>
          </div>
        {% endfor %}
      </div>

      <div class="attendease-description">
        {{ instance.session.description | markdownify }}
      </div>

      <div class="attendease-instance-details">
        <div class="attendease-instance-detail attendease-time-range" data-duration="{{ instance.duration }}" data-start-time="{{ instance.time }}">
          {{ instance.time_formatted }} - {{ instance.end_time_formatted}}

          <div class="attendease-duration" data-duration="{{ instance.duration }}">
            {{ instance.duration_formatted }}
          </div>
        </div>

        <div class="attendease-instance-divider"></div>

        <div class="attendease-instance-detail attendease-instance-location">
          <div class="attendease-instance-location-venue"><a href="/venues/{{ instance.venue_slug }}">{{ instance.room.venue_name }}</a></div>
          <div class="attendease-instance-location-room">{{ instance.room.name }}</div>
        </div>

        {% if instance.session.primary_filter %}
        <div class="attendease-instance-divider"></div>

        <div class="attendease-instance-detail">
          <div class="attendease-primary-filter-name">{{ instance.session.primary_filter_name }}</div>
          <div class="attendease-primary-filter">{{ instance.session.primary_filter }}</div>
        </div>
        {% endif %}

        {% if site.attendease.data.attendease_event_scheduling_available %}
          <div class="attendease-instance-divider"></div>

          <div class="attendease-instance-detail attendease-scheduling-widget">
            <div class="attendease-schedule-status"></div>
            <div class="attendease-schedule-action"></div>
          </div>
        {% endif %}
      </div>
    </div>
  {% endfor %}
</div>
